<template>
  <j-modal
    :title="title"
    :width="1200"
    :visible="visible"
    :maskClosable="false"
    switchFullscreen
    @ok="handleOk"
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
    @cancel="handleCancel">
    <erp-mallorder-list ref='mallorderList' :action='false'></erp-mallorder-list>
  </j-modal>
</template>

<script>
import ErpMallorderList from '../../mallorder/ErpMallorderList.vue'
export default {
  name: 'ErpTransferOrderModal',
  components:{ErpMallorderList},
  data() {
    return {
      title:'',
      width:800,
      visible: false,
      disableSubmit: false
    }
  },
  methods:{
    add () {
      this.visible=true
    },
    edit (record) {
      this.visible=true
    },
    close () {
      this.$emit('close');
      this.visible = false;
    },
    handleOk () {
      let params={
        data:this.$refs.mallorderList.selectionRows
      }
     this.submitCallback(params)
    },
    submitCallback(params){
      this.$emit('ok',params);
      this.visible = false;
    },
    handleCancel () {
      this.close()
    }
  }
}
</script>

<style scoped>
</style>